package com.fau.hm.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;

/**
 * @desc 总日报表-订单统计
 * @author dangjh
 * @datetime 2014年11月28日 上午11:24:26
 */
public class MedicalDailyOrdersSta implements Serializable, JSONAware {

	private static final long serialVersionUID = -4319329410055388040L;

	private String platformName;			// 中心名称
	private String groupName;				// 组名称
	private String userName;				// 用户名称
	private String name;					// 登录名
	private Integer newOrder;				// 下单数
	private BigDecimal newOrderMoney;		// 下单金额
	private Integer complexNumber;			// 复购数
	private BigDecimal complexMoney;		// 复购金额
	private Double complexRate;				// 复购率
	private Integer totalOrdersNumber;		// 总订单数
	private BigDecimal totalMoney;			// 总金额
	private Integer deliveryNumber;			// 发货单数
	private Integer backNumber;				// 退单数
	private BigDecimal backMoney;			// 退单金额
	private Double backRate;				// 退单率
	private Integer signNumber;				// 签收单数
	private BigDecimal signMoney;			// 签收金额
	private Integer nuclearNumber;			// 核单数量
	private BigDecimal nuclearMoney;		// 核单金额
	private Integer cancelNumber;			// 取消单数量
	
	private String hospitalId;
	private Date startTime;
	private Date endTime;
	
	public String getPlatformName() {
		return platformName;
	}

	public void setPlatformName(String platformName) {
		this.platformName = platformName;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getNewOrder() {
		return newOrder;
	}

	public void setNewOrder(Integer newOrder) {
		this.newOrder = newOrder;
	}

	public BigDecimal getNewOrderMoney() {
		return newOrderMoney;
	}

	public void setNewOrderMoney(BigDecimal newOrderMoney) {
		this.newOrderMoney = newOrderMoney;
	}

	public Integer getComplexNumber() {
		return complexNumber;
	}

	public void setComplexNumber(Integer complexNumber) {
		this.complexNumber = complexNumber;
	}

	public BigDecimal getComplexMoney() {
		return complexMoney;
	}

	public void setComplexMoney(BigDecimal complexMoney) {
		this.complexMoney = complexMoney;
	}

	public Double getComplexRate() {
		return complexRate;
	}

	public void setComplexRate(Double complexRate) {
		this.complexRate = complexRate;
	}

	public Integer getTotalOrdersNumber() {
		return totalOrdersNumber;
	}

	public void setTotalOrdersNumber(Integer totalOrdersNumber) {
		this.totalOrdersNumber = totalOrdersNumber;
	}

	public BigDecimal getTotalMoney() {
		return totalMoney;
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}

	public Integer getDeliveryNumber() {
		return deliveryNumber;
	}

	public void setDeliveryNumber(Integer deliveryNumber) {
		this.deliveryNumber = deliveryNumber;
	}

	public Integer getBackNumber() {
		return backNumber;
	}

	public void setBackNumber(Integer backNumber) {
		this.backNumber = backNumber;
	}

	public BigDecimal getBackMoney() {
		return backMoney;
	}

	public void setBackMoney(BigDecimal backMoney) {
		this.backMoney = backMoney;
	}

	public Double getBackRate() {
		return backRate;
	}

	public void setBackRate(Double backRate) {
		this.backRate = backRate;
	}

	public Integer getSignNumber() {
		return signNumber;
	}

	public void setSignNumber(Integer signNumber) {
		this.signNumber = signNumber;
	}

	public BigDecimal getSignMoney() {
		return signMoney;
	}

	public void setSignMoney(BigDecimal signMoney) {
		this.signMoney = signMoney;
	}

	public Integer getNuclearNumber() {
		return nuclearNumber;
	}

	public void setNuclearNumber(Integer nuclearNumber) {
		this.nuclearNumber = nuclearNumber;
	}

	public BigDecimal getNuclearMoney() {
		return nuclearMoney;
	}

	public void setNuclearMoney(BigDecimal nuclearMoney) {
		this.nuclearMoney = nuclearMoney;
	}

	public Integer getCancelNumber() {
		return cancelNumber;
	}

	public void setCancelNumber(Integer cancelNumber) {
		this.cancelNumber = cancelNumber;
	}

	public String getHospitalId() {
		return hospitalId;
	}

	public void setHospitalId(String hospitalId) {
		this.hospitalId = hospitalId;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@SuppressWarnings("unchecked")
	@Override
	public String toJSONString() {
		JSONObject obj = new JSONObject();
		obj.put("platformName", platformName);
		obj.put("groupName", groupName);
		obj.put("userName", userName);
		obj.put("name", name);
		obj.put("newOrder", newOrder);
		obj.put("newOrderMoney", newOrderMoney);
		obj.put("complexNumber", complexNumber);
		obj.put("complexMoney", complexMoney);
		obj.put("complexRate", complexRate);
		obj.put("totalOrdersNumber", totalOrdersNumber);
		obj.put("totalMoney", totalMoney);
		obj.put("deliveryNumber", deliveryNumber);
		obj.put("backNumber", backNumber);
		obj.put("backMoney", backMoney);
		obj.put("backRate", backRate);
		obj.put("signNumber", signNumber);
		obj.put("signMoney", signMoney);
		obj.put("nuclearNumber", nuclearNumber);
		obj.put("nuclearMoney", nuclearMoney);
		obj.put("cancelNumber", cancelNumber);
		obj.put("", hospitalId);
		if(null != startTime) {
			obj.put("startTime", DateFormatUtils.format(startTime, "yyyy-MM-dd HH:mm:ss"));
		}
		if(null != endTime) {
			obj.put("endTime", DateFormatUtils.format(endTime, "yyyy-MM-dd HH:mm:ss"));
		}
		return obj.toJSONString();
	}

}
